import React,{useState,useEffect} from 'react';
import {HelloComponent,NameEditComponent} from './component/hello';





const App = () => {

  const [name,setName] = useState('刘大侠');
  const setUserNameState = (newName:string) => {
    setName(newName);
  }
  return (
    <>
      <HelloComponent userName={name}/>
      <NameEditComponent initialUserName={name} onNameUpdated={setName}/>
    </>
  )
}

export default App;